import 'package:aio/aio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:app/generated/app_strings.dart';
import 'package:app/src/http/bean/wroks/contract_bean.dart';
import 'package:app/src/http/bean/wroks/pay_notice_bean.dart';
import 'package:app/src/ui/route/works/public/items/ui_base.dart';
import 'package:app/src/ui/route/works/public/items/ui_card.dart';

///确认收款，通知单信息
class UiPayNoticeInfo {
  ///data 信息
  ///oldData 历史信息
  static Widget build(BuildContext context, PayNotice? data,
      PayNotice? oldData,{String? title}) {
    List<Widget> children = [];
    if(StringUtils.isEmpty(title)){
      title=AppStrings.of(context).NoticeInfo;//通知单信息
    }
    children.add(
        UiBase.title(context, title)); //标题
    children.add(UiBase.item(context, AppStrings.of(context).NoticeId,
        data?.NoticeId, oldData?.NoticeId)); //通知单号
    children.add(UiBase.item(context, AppStrings.of(context).AddDate6,
        data?.AddDate, oldData?.AddDate)); //通知日期
    children.add(UiBase.item(context, AppStrings.of(context).CustomerName,
        data?.CustomerName, oldData?.CustomerName)); //客户名称
    children.add(UiBase.item(context, AppStrings.of(context).ColCode,
        data?.ColCode, oldData?.ColCode)); //收款单号
    children.add(UiBase.item(context, AppStrings.of(context).ColDateTime,
        data?.ColDateTime, oldData?.ColDateTime)); //收款日期
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }
}